cmake_minimum_required(VERSION 2.8)

project(power)

aux_source_directory(. MAIN)

# 将子目录添加, 会执行子目录的CMakeLists.txt
add_subdirectory(math)

add_executable(power ${MAIN})

# 将可执行文件与powerlib进行链接
target_link_libraries(power powerlib)

# 构建一个 CPack 安装包
include (InstallRequiredSystemLibraries)
set (CPACK_RESOURCE_FILE_LICENSE
  "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
set (CPACK_PACKAGE_VERSION_MAJOR "${Demo_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${Demo_VERSION_MINOR}")
include (CPack)